package cn.com.dcsgo.validation.menu;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 菜单校验结果
 *
 * @author Dcsgo
 * @since 2025/10/12 12:40
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class MenuValidationResult {
    /**
     * 校验通过
     */
    public static MenuValidationResult success(){
        return new MenuValidationResult(true,null);
    }
    /**
     * 目录校验失败
     */
    public static MenuValidationResult failure(String errorMessage){
        return new MenuValidationResult(false,errorMessage);
    }

    /**
     * 是否校验通过
     */
    private  boolean valid;
    /**
     * 错误信息
     */
    private  String errorMessage;
}
